package com.xiaocai.myblog.common;

import com.xiaocai.myblog.enums.ResponseEnum;

import java.io.Serializable;

/**
 * @author chenhefu
 * @date 2019-09-30 18:25
 */
public class SuccessResponseData<T> extends ResponseData<T> implements Serializable {
    private static final long serialVersionUID = -2205089127421311430L;


    private SuccessResponseData(T data){
        super(ResponseEnum.SUCCESS.getCode(),ResponseEnum.SUCCESS.getMsg(),data);
    }

    public static <T> SuccessResponseData<T> getSuccessData(T obj){
       return new SuccessResponseData<>(obj);
    }
}
